//C11:ep11_6.c: struct vaviable as argument-2.

#include <stdio.h>
#include <string.h>
#define FORMAT "%d\n%s\n%f\n%f\n%f\n"

struct student_st
{
    int num;
    char name[20];
    float score[3];
} stu[3] = {12345,"Li Li,67.5,89,78.6"};

void print(struct student_st *);
int main(void)
{
    print(stu);
    printf("\nhello\n");
}

void print(struct student_st *p)
{
    printf(FORMAT,p->num,p->name,p->score[0],p->score[1],p->score[2]);
    printf("\n");
}